package com.example.chcrm.entity.employee;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.example.chcrm.entity.common.OperateRecord;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @Author 邹
 * @Date 2025/4/18 23:01
 * @Version 1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SupplierPort implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.INPUT)
    private String id;
    private String orgId;
    @NotBlank(message = "所属供应商id不能为空")
    private String supplierId;      //所属供应商id
    @NotBlank(message = "所属供应商名称不能为空")
    private String supplierName;    //所属供应商名称

    @NotBlank(message = "港口名称不能为空")
    private String portName;    //港口名称
    @NotBlank(message = "所在区域id不能为空")
    private String areaId;      //所在区域Id
    @NotBlank(message = "所在区域id(包含父级)不能为空")
    private String areaFullId;  //所在区域Id（包含父级）
    @NotBlank(message = "所在区域名不能为空")
    private String area;        //所在区域
    @NotNull(message = "所在区域经纬度不能为空")
    private String coordinate;  //所在区域经纬度
    @NotNull(message = "详细地址不能为空")
    private String address;     //详细地址

    private Integer status;     //状态1启用中 0禁用中
    private Integer isDeleted;  //是否删除0否 -1是
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;    //创建时间

    /**
     * 分页默认值
     */
    @TableField(exist = false)
    private Integer page = 1;
    @TableField(exist = false)
    private Integer rows = 10;
    @TableField(exist = false)
    private List<OperateRecord> operateRecordList;  //操作记录

}

